
import calendar
import datetime
import sys
import re

dtnow_plain = lambda : re.sub('[-. :]', '', str(datetime.datetime.now())[:19])
#20080716194418

def main(m=''):
    """ """
    #calendar.prmonth(2011, 4)
    y = int(dtnow_plain()[:4])
    if m == '':
        m = int(dtnow_plain()[4:6])
    else:
        m = int(m)
    
    calendar.prmonth(y, m)

if __name__ == "__main__":
    ''' '''
    if len(sys.argv) == 1:
        main()
    elif len(sys.argv) == 2:
        main(sys.argv[1])
    else:
        print """

        Show year calendar for selected month of current year.
        
        calendar_month [<month>]

        example: calendar_month
        example: calendar_month 4

        month (optional)
            defines for which month (if not actual) calendar be printed
        """
